(in-package :graph-model)

(defgeneric mark-object (o))
(defgeneric unmark-object (o))

(defclass marked-mixin ()
  ((mark :initarg :mark :accessor mark :initform nil)))

(defmethod mark-object ((o marked-mixin))
  (setf (mark o) t))

(defmethod unmark-object ((o marked-mixin))
  (setf (mark o) nil))

(defmethod mark ((l list))
  (mapc #'mark-object l))

(defmethod unmark ((l list))
  (mapc #'unmark-object l))

